package com.sphd.beautysalon.presenter;


import com.android.volley.VolleyError;
import com.sphd.beautysalon.model.ForgetModelImpl;
import com.sphd.beautysalon.view.ForgetView;

/**
* Created by Hu on 2016/10/31
*/

public class ForgetPresenterImpl implements ForgetPresenter {
    private ForgetModelImpl forgetModel;
    private ForgetView forgetView;

    public ForgetPresenterImpl(ForgetView forgetView) {
        this.forgetView = forgetView;
        forgetModel=new ForgetModelImpl();
    }

    @Override
    public void addData(String url) {
        forgetView.showLoading();
        forgetModel.sendUrl(url,this);
    }

    @Override
    public void sendError(VolleyError error) {
        forgetView.dissLoading();
    }

    @Override
    public void sendRes(int res) {
        forgetView.sendRes(res);
        forgetView.dissLoading();
    }
}